﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

namespace 李晓霞web
{
    public partial class TeacherMainPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            lblTeacher1.Text = "当前在线人数";
            lblTeacher2.Text = "点击量";
            lblTeacher1.Text += Application["online"];
            lblTeacher2.Text += Application["click"];

        }
        protected void Page_PreInit(object sender, EventArgs e)
        {
            if (Request.QueryString["Theme"] == null)
            {
                Theme = "灰暗色调";
            }
            else
            {
                Theme = Request.QueryString["Theme"];
            }
            Page.Theme = Theme;
            ListItem item = DropDownList1.Items.FindByValue(Theme);
            if (item != null)
            {
                item.Selected = true;
            }
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string url = Request.Path + "?Theme=" + DropDownList1.SelectedItem.Value;
            Response.Redirect(url);
        }
    }
}